package chapter03

import scala.collection.mutable.ArrayBuffer

object ArrayTest extends App {

  val array = Array(1, 2)
  println(array(0))
  println(array(1))

  println(array.mkString("{",",","}"))
  val bufferArray = ArrayBuffer[Int]()
  bufferArray.insert(0, 1, 2, 3, 45)
  bufferArray.sum
  bufferArray.max

  
  scala.util.Sorting.quickSort(array)
  bufferArray.trimEnd(2)
  println(bufferArray)
  bufferArray.remove(1)
  val newArray = bufferArray.toArray
  bufferArray.remove(1, 10)
  
  
  val matrix = Array.ofDim(3,4)
}